package com.isoftstone.disk.login.controller;

import com.isoftstone.disk.login.service.LoginService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("/login")
public class LoginController {

    @Resource
    private LoginService loginService;

    @RequestMapping("/login")
    public String login(HttpServletRequest request)
    {
        String siteLanguage = request.getParameter("siteLanguage");
        HttpSession session = request.getSession();
        session.setAttribute("siteLanguage",siteLanguage);
        return  "login/login";
    }
    @RequestMapping("/main")
    public String main(){
        return "redirect:/";
    }

}
